
// 点巡检标准
import qs from 'qs'
import request from "@/utils/request"

/**
 *GET 获取点巡检标准列表
  * @params
 * @return {*}
 */
export function getSpotInspectionStandardsList(params) {
  return request({
    url: "/spotInspectionStandards/getList?" + qs.stringify(params),
    method: "get",
  })
}
/**
 *GET 通过设备组获取设备类型和设备以及点巡检标准巡检项目
  * @params  deviceGroupIdList  array[string]
 * @return {*}
 */
export function getListByDeviceGroup(deviceGroupIdList='') {
  return request({
    url: "/spotInspectionStandards/getListByDeviceGroup?deviceGroupIdList=" + deviceGroupIdList,
    method: "get",
  })
}


/**
 * 新增点巡检标准
 * @return {*}
 */
export function addSpotInspectionStandards(data) {
  return request({
    url: "/spotInspectionStandards/add",
    method: "post",
    data
  })
}

/**
 * 修改点巡检标准
 * @return {*}
 */
export function updateSpotInspectionStandards(data) {
  return request({
    url: "/spotInspectionStandards/update",
    method: "post",
    data
  })
}

/**
 * 删除点巡检标准
 * @return {*}
 */
export function deleteSpotInspectionStandardsById(id) {
  return request({
    url: "/spotInspectionStandards/delete?id=" + id,
    method: "delete",
  })
}

/**
 *GET 通过设备类型获取点巡检标准巡检项目
  * @params
 * @return {*}
 */
export function getSpotInspectionStandardsItem(deviceTypeList='') {
  return request({
    url: "/spotInspectionStandards/getListByDeviceType?deviceTypeList=" + deviceTypeList,
    method: "get",
  })
}

/**
 *GET 通过设备类型获取该类型下的 ?? 标准项目
  * @params
 * @return {*}
 */
export function getItemListByDeviceType(deviceType='') {
  return request({
    url: "/spotInspectionStandards/getItemListByDeviceType?deviceType=" + deviceType,
    method: "get",
  })
}
/**
 *GET 通过设备类型获取该类型下的保养标准项目
  * @params
 * @return {*}
 */
export function getItemListMaintenance(deviceType='') {
  return request({
    url: "/maintenanceStandards/getItemListByDeviceType?deviceType=" + deviceType,
    method: "get",
  })
}
